{% extends 'base.html' %}

{% block content %}
    <div class="container">
        <div class="col-md-4 col-md-offset-4">
          <form class='form-login' action="register" method="post">{% csrf_token %}
              {% if message %}
                <div class="alert alert-warning">{{ message }}</div>
              {% endif %}
            
              <h2 class="text-center">注册</h2>
              <div class="form-group">
                <label for="id_username">用户名：</label>
                <input type="text" name='username' class="form-control" id="id_username" placeholder="Username" autofocus required>
              </div>
              <div class="form-group">               
                <label for="id_password">密码：</label>
                <input type="password" name='password' class="form-control" id="id_password" placeholder="Password" required>
             </div>
              <div class="form-group">               
                <label for="id_email">邮箱:</label>
                <input type="email" name='email' class="form-control" id="id_email" placeholder="Email" required>
              </div>
              <div class="form-group">               
                  <label for="id_password">Question: 本站作者是？</label>
                  <input type="text" name='question' class="form-control" id="id_question" placeholder="Question" required>
            </div>
              <button type="reset" class="btn btn-default pull-left">重置</button>
              <button type="submit" class="btn btn-primary pull-right">提交</button>
          </form>
          <!--<div class="col-md-4 col-md-offset-4"> <p style="color:red;">{{ error_msg }}</p></div>-->
         
        </div>
       
    </div> <!-- /container -->
{% endblock %}